In addition to the .NET namespaces that define the types of a specific data provider, the .NET base class libraries provide a number of additional ADO.NET-centric namespaces, some of which you can see in Table 21-3 (again, Chapter 24 will address the assemblies and namespaces specific to Entity Framework).
Table 21-3. Select Additional ADO.NET-Centric Namespaces
Namespace | Meaning in Life |
---|---|
Microsoft.SqlServer.Server | This namespace provides types that facilitate CLR and SQL Server 2005 and later integration services. |
System.Data | This namespace defines the core ADO.NET types used by all data providers, including common interfaces and numerous types that represent the disconnected layer (e.g., DataSet and DataTable). |
System.Data.Common | This namespace contains types shared between all ADO.NET data providers, including the common abstract base classes. |
System.Data.Sql | This namespace contains types that allow you to discover Microsoft SQL Server instances installed on the current local network. |
System.Data.SqlTypes | This namespace contains native data types used by Microsoft SQL Server. You can always use the corresponding CLR data types, but the SqlTypes are optimized to work with SQL Server (e.g., if your SQL Server database contains an integer value, you can represent it using either int or SqlTypes.SqlInt32). |
Note that this chapter does not examine every type within every ADO.NET namespace (that task would require a large book all by itself); however, it is quite important that you understand the types within the System.Data namespace.